package com.hmall.mapper;

import com.hmall.model.XtxUserInfo;
import com.hmall.util.MyMapper;
import com.hmall.vo.XtxUserInfoVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface XtxUserInfoMapper extends MyMapper<XtxUserInfo> {
    XtxUserInfo selectByUserId(@Param("userId") Integer userId);

    List<XtxUserInfo> selectByRand(@Param("size") Integer size);

    List<XtxUserInfo> selectByRandAndUserId(@Param("size") Integer size,@Param("userId") Integer userId);

    List<XtxUserInfo> selectRecentFocusUserInfo(@Param("userId") Integer userId,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<XtxUserInfo> selectFansByUserId(@Param("userId")Integer userId, @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);

    Integer selectCountByKeyword(@Param("keyword") String keyword);

    List<XtxUserInfo> selectByKeyword(@Param("keyword")String keyword, @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);

    Integer selectCountByKeywordAndType(@Param("keyword")String keyword,@Param("userTypeId") Integer userTypeId);

    List<XtxUserInfo> selectByKeywordAndType(@Param("keyword")String keyword,@Param("userTypeId") Integer userTypeId, @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);

    List<XtxUserInfo> selectListAllByUserId(@Param("userId")Integer userId, @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);
}